#pragma once
#include <GLES2/gl2.h>
#include <EGL/egl.h>

#include "ShaderManager.h"

class DisplayDevice_EGL
{
	EGLSurface m_EGLSurface;
	EGLDisplay m_EGLDisplay;
	EGLContext m_EGLContext;

	

	// TEST
	void (*renderFunc)(void);
	//renderFunc *m_renderDelegate;
	GLuint m_frameBuffer;
	GLuint m_depthRenderBuffer;
	GLuint m_textures[2];
	::ShaderManager m_shaderManager;

public:
	DisplayDevice_EGL(void);
	~DisplayDevice_EGL(void);

	void Resize(int w, int h);
	bool Initialize(int gl_version, void *nativeWindow);
	void Terminate();
	void Render();
	void PreRender();
	void PostRender();
	void OnRender(void (*renderFunc)(void));
	void BufTest(int width, int height);
	ShaderManager &GetShaderManager() { return m_shaderManager; }
};

